package com.hhq.usercenter.domain.model;

import com.baomidou.mybatisplus.annotation.TableName;
import com.hhq.common.domain.model.BaseModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

/**
 * <p>Description: 菜单模型 </p>
 *
 * @author : xiaodong.yang
 * @date : 2024/1/9 17:31
 */
@Table(name = "t_menu")
@Entity
@TableName("t_menu")
@Setter
@Getter
@org.hibernate.annotations.Table(appliesTo = "t_menu", comment = "菜单表")
public class MenuModel extends BaseModel {

    /**
     * 菜单名称
     */
    @ApiModelProperty(value = "菜单名称")
    @Column(nullable = false, columnDefinition = "varchar(255) default '' comment '菜单名称'")
    private String name;

    /**
     * 父菜单ID
     */
    @ApiModelProperty(value = "父菜单ID")
    @Column(nullable = false, columnDefinition = "int(11)  comment '父菜单ID'")
    private Integer parentId;

    /**
     * 显示顺序
     */
    @ApiModelProperty(value = "显示顺序")
    @Column(nullable = false, columnDefinition = "int(6) default 0 comment '显示顺序'")
    private Integer orderNum;

    /**
     * 路由地址
     */
    @ApiModelProperty(value = "路由地址")
    @Column(columnDefinition = "varchar(522) default '' comment '路由地址'")
    private String path;

    /**
     * 组件路径
     */
    @ApiModelProperty(value = "组件路径")
    @Column(columnDefinition = "varchar(255) default '' comment '用户名称'")
    private String component;

    /**
     * 接口地址
     */
    @ApiModelProperty(value = "接口地址")
    @Column(columnDefinition = "varchar(255) default '' comment '接口地址'")
    private String apiUrl;

    /**
     * 路由参数
     */
    @ApiModelProperty(value = "路由参数")
    @Column(nullable = false, columnDefinition = "varchar(255) default '' comment '路由参数'")
    private String routerParam;

    /**
     * 是否为外链(0-否;1-是)
     */
    @ApiModelProperty(value = "是否为外链(0-否;1-是)")
    @Column(nullable = false, columnDefinition = "int(1) default 0 comment '是否为外链(0-否;1-是)'")
    private Integer isFrame;

    /**
     * 菜单类型（M目录 C菜单 F按钮）
     */
    @ApiModelProperty(value = "菜单类型(M目录 C菜单 F按钮)")
    @Column(nullable = false, columnDefinition = "varchar(255) default 'C' comment '菜单类型(M目录 C菜单 F按钮)'")
    private String menuType;

    /**
     * 菜单状态(0显示 1隐藏)
     */
    @ApiModelProperty(value = "菜单状态(0显示 1隐藏)")
    @Column(nullable = false, columnDefinition = "int(1) default 0 comment '菜单状态(0显示 1隐藏)'")
    private Integer visible;

    /**
     * 菜单状态(0正常 1停用)
     */
    @ApiModelProperty(value = "菜单状态(0正常 1停用)")
    @Column(nullable = false, columnDefinition = "int(1) default 0 comment '菜单状态(0正常 1停用)'")
    private Integer status;

    /**
     * 权限标识
     */
    @ApiModelProperty(value = "权限标识")
    @Column(columnDefinition = "varchar(255)  comment '权限标识'")
    private String perms;

    /**
     * 菜单图标
     */
    @ApiModelProperty(value = "菜单图标")
    @Column(columnDefinition = "varchar(255) default '' comment '菜单图标'")
    private String icon;
}
